package me.zhengjie.pojo.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class AgvTaskSubmitVo {

    //消息码 "SUCCESS"
    private String code;

    //消息内容 "成功"
    private String message;


//    private Object data;
    private TaskSubmitData data;

    public static AgvTaskSubmitVo OK(Object taskCode){
        AgvTaskSubmitVo agvTaskSubmitVo = new AgvTaskSubmitVo();
        agvTaskSubmitVo.setCode("SUCCESS");
        agvTaskSubmitVo.setMessage("成功");
        TaskSubmitData taskSubmitData = new TaskSubmitData();
        taskSubmitData.setRobotTaskCode((String) taskCode);
        agvTaskSubmitVo.setData(taskSubmitData);
        return agvTaskSubmitVo;
    }

    public static AgvTaskSubmitVo ng(Object taskCode){
        AgvTaskSubmitVo agvTaskSubmitVo = new AgvTaskSubmitVo();
        agvTaskSubmitVo.setCode("fail");
        agvTaskSubmitVo.setMessage("失败");
        TaskSubmitData taskSubmitData = new TaskSubmitData();
        taskSubmitData.setRobotTaskCode((String) taskCode);
        agvTaskSubmitVo.setData(taskSubmitData);
        return agvTaskSubmitVo;
    }
}
